package com.hwua.service.Impl;

import com.hwua.dao.IProductDao;
import com.hwua.dao.Impl.ProductDaoImpl;
import com.hwua.entity.Product;
import com.hwua.entity.ProductCategory;
import com.hwua.service.IProductAllService;


import java.util.List;

public class ProductAllServiceImpl implements IProductAllService {
    private IProductDao productDao=new ProductDaoImpl();
    @Override
    public List<Product> queryAll() throws Exception {
        return productDao.queryAll();
    }

    @Override
    public List<Product> queryA() throws Exception {
        return productDao.query();
    }

    @Override
    public List<Product> queryAllForLimit(Integer start, Integer pageSize) throws Exception {
        return productDao.queryAllForLimit(start,pageSize);
    }

    @Override
    public Long queryCount() throws Exception {
        return productDao.queryCount();
    }

    @Override
    public List<Product> queryById(int minor_id) throws Exception {
        return productDao.queryById(minor_id);
    }

    @Override
    public Product queryByProdId(int id) throws Exception {
        return productDao.queryByProdId(id);
    }

    @Override
    public Product queryByMinorID(int minor_id) throws Exception {
        return productDao.queryByMinorID(minor_id);
    }

    @Override
    public List<Product> queryByMajor_id(int Major_id) throws Exception {
        return productDao.queryByMajor_id(Major_id);
    }
}
